Learn R Programming

pchc (version 0.4)

Adjacency matrix of a Bayesian network: Adjacency matrix of a Bayesian network

Description

Adjacency matrix of a Bayesian network.

Usage

bnmat(dag)

Arguments

dag

A BN object, an object of class "bn".

Value

Adjacency matrix of a Bayesian network is extracted.

Details

The function is called from the "bnlearn" package which invokes the "Rgraphviz" package from Bioconductor and you need to install it first.

See Also

pchc, pc.skel

Examples

Run this code
# NOT RUN {
x <- matrix( rnorm(200 * 10, 1, 10), nrow = 200 )
a <- pchc::pchc(x)
pchc::bnmat(a$dag)
# }

Run the code above in your browser using DataLab